home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / include / unistd.h < prev    next >
C/C++ Source or Header  |  1991-06-04  |  3KB  |  89 lines

  1. /*
  2.  * unistd.h --
  3.  *
  4.  *      Macros, constants and prototypes for Posix conformance.
  5.  *
  6.  * Copyright 1989 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  * $Header: /sprite/src/lib/include/RCS/unistd.h,v 1.7 91/06/04 17:01:46 kupfer Exp $
  16.  */
  17.  
  18. #ifndef _UNISTD
  19. #define _UNISTD
  20.  
  21. #include <cfuncproto.h>
  22. #include <sys/types.h>
  23.  
  24. #ifdef __STDC__
  25. #define VOLATILE volatile
  26. #else
  27. #define VOLATILE
  28. #endif
  29.  
  30. #ifndef NULL
  31. #define NULL    0
  32. #endif
  33.  
  34. #ifndef _SIZE_T
  35. #define _SIZE_T
  36. typedef int size_t;
  37. #endif
  38.  
  39. /* 
  40.  * Strict POSIX stuff goes here.  Extensions go down below, in the 
  41.  * ifndef _POSIX_SOURCE section.
  42.  */
  43.  
  44. extern void VOLATILE _exit _ARGS_((int status));
  45. extern int chdir _ARGS_((const char *path));
  46. extern int chown _ARGS_((const char *path, uid_t owner, gid_t group));
  47. extern int close _ARGS_((int fd));
  48. extern int dup _ARGS_((int oldfd));
  49. extern int dup2 _ARGS_((int oldfd, int newfd));
  50. extern int execl _ARGS_((const char *path, ...));
  51. extern int execle _ARGS_((const char *path, ...));
  52. extern int execlp _ARGS_((const char *file, ...));
  53. extern int execv _ARGS_((const char *path, char **argv));
  54. extern int execve _ARGS_((const char *path, char **argv, char **envp));
  55. extern int execvp _ARGS_((const char *file, char **argv));
  56. extern int fork _ARGS_((void));
  57. extern char *getcwd _ARGS_((char *buf, int size));
  58. extern gid_t getegid _ARGS_((void));
  59. extern uid_t geteuid _ARGS_((void));
  60. extern gid_t getgid _ARGS_((void));
  61. extern int getgroups _ARGS_((int bufSize, int *buffer));
  62. extern uid_t getuid _ARGS_((void));
  63. extern int isatty _ARGS_((int fd));
  64. extern long lseek _ARGS_((int fd, long offset, int whence));
  65. extern int pipe _ARGS_((int *fildes));
  66. extern int read _ARGS_((int fd, char *buf, size_t size));
  67. extern int setgid _ARGS_((gid_t group));
  68. extern int setuid _ARGS_((uid_t user));
  69. extern int unlink _ARGS_((const char *path));
  70. extern int write _ARGS_((int fd, const char *buf, size_t size));
  71.  
  72. #ifndef    _POSIX_SOURCE
  73. extern char *crypt _ARGS_((const char *, const char *));
  74. extern int fchown _ARGS_((int fd, uid_t owner, gid_t group));
  75. extern int flock _ARGS_((int fd, int operation));
  76. extern int ftruncate _ARGS_((int fd, unsigned long length));
  77. extern int readlink _ARGS_((const char *path, char *buf, int bufsize));
  78. extern int setegid _ARGS_((gid_t group));
  79. extern int seteuid _ARGS_((uid_t user));
  80. extern int setreuid _ARGS_((int ruid, int euid));
  81. extern int symlink _ARGS_((const char *, const char *));
  82. extern int truncate _ARGS_((const char *path, unsigned long length));
  83. extern int umask _ARGS_((int cmask));
  84. extern int vfork _ARGS_((void));
  85. #endif /* _POSIX_SOURCE */
  86.  
  87. #endif /* _UNISTD */
  88.  
  89.